the sentences came after a trial in pakistan , a judge says .
malala yousafzai is an outspoken advocate for the education of girls .
she was attacked in pakistan in 2012 .